from toee import *
from utilities import *

def san_dialog( attachee, triggerer ):
	triggerer.begin_dialog( attachee, 1 )
	return SKIP_DEFAULT

def san_heartbeat( attachee, triggerer ):
	if (game.global_vars[694] == 0 and attachee.leader_get() == OBJ_HANDLE_NULL and not game.combat_is_active()):
		attachee.cast_spell(spell_mirror_image, attachee)
		attachee.spells_pending_to_memorized()
		game.global_vars[694] = 1
	return RUN_DEFAULT

def run_off( attachee, triggerer ):
	# loc = location_from_axis(427,406)
	# attachee.runoff(loc)
	attachee.runoff(attachee.location-3)
	return RUN_DEFAULT